<?php
/* @var $this UserController */
/* @var $model User */

$this->breadcrumbs=array(
	Yii::t('app', 'Message')=>array('index'),
	Yii::t('app', 'Bulletin Board History'),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-form form').submit(function(){
	$('#post-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="page-header">
	<div class="page-title"><h3><?php echo Yii::t('app', 'Post History Of ' ) . $model->user->nickname ?></h3></div>
</div>

<h1></h1>

<div class="search-form">
<?php 
// $this->renderPartial('search/_search',array(
	// 'model'=>$model,
// )); 
?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'post-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		array(
			'header' => Yii::t('app', 'No.'),
			'type' => 'raw',
			'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
			'headerHtmlOptions' => array('width' => '30px','style' => 'text-align:center;'),
			'htmlOptions' => array('style' => 'text-align:center;')
		),
		array(
			'header' => Yii::t('app', 'Topic'),
			'value' => '$data->topic->name',
		),
		'content',
		'created_time:time',
	),
	'itemsCssClass'=>'table table-bordered table-hover',
	'cssFile'=>false,
)); ?>
